package com.huashi.dealer.commonEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 购物车模型类
 * 对应数据库表：yoshop_cart
 * 
 * @author 谭陈强
 * @since 2025-01-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("yoshop_cart")
@Schema(description = "购物车实体")
public class Cart extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 购物车ID
     */
    @TableId(value = "cart_id", type = IdType.AUTO)
    @Schema(description = "购物车ID")
    private Long cartId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 商品ID
     */
    @TableField("goods_id")
    @Schema(description = "商品ID")
    private Long goodsId;

    /**
     * 商品规格ID
     */
    @TableField("goods_sku_id")
    @Schema(description = "商品规格ID")
    private Long goodsSkuId;

    /**
     * 商品数量
     */
    @TableField("goods_num")
    @Schema(description = "商品数量")
    private Integer goodsNum;

    /**
     * 商品类型：10普通商品，20核销商品，30返利商品
     */
    @TableField("is_goods_type")
    @Schema(description = "商品类型：10普通商品，20核销商品，30返利商品")
    private Integer isGoodsType;

    /**
     * 小程序ID
     */
    @TableField("wxapp_id")
    @Schema(description = "小程序ID")
    private Long wxappId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @Schema(description = "创建时间")
    private Long createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Schema(description = "更新时间")
    private Long updateTime;

    /**
     * 软删除：0未删除，1已删除
     */
    @TableField("is_delete")
    @Schema(description = "软删除：0未删除，1已删除")
    @TableLogic
    private Integer isDelete;
} 